<?php
 /*****************************************************************************
 * newContact.php                                                             *
 * Last Modified: 2007-06-06                                                  *
 *                                                                            *
 * newContact.php outputs an HTML form to be used to create a new invoice     *
 * record.                                                                    *
 *                                                                            *
 * BBG_Billing, a PHP application using MySQL for creating and maintaining a  *
 * contacts and invoices database.                                            *
 *                                                                            *
 * @copyright Copyright (C) 2007, Bugs Bee Gone Computer Services             *
 * @owner     Daniel Barnett (Bugs Bee Gone Computer Services)                *
 * @author    Daniel Barnett <dbarnett@bugsbeegone.com>                       *
 * @website   http://www.bugsbeegone.com                                      *
 * @license   http://www.gnu.org/licenses/gpl.html GNU General Public License *
 * @package   BBG_Billing                                                     *
 * @name      newContact.php                                                  *
 * @version   1.0.0                                                           *
 * @uses      Jpmaster77's Login Script (Written by: Jpmaster77, 2004-08-19)  *
 *             ->(http://www.evolt.org/PHP-Login-System-with-Admin-Features/) *
 *                                                                            *
 * This file is part of the "BBG_Billing" PHP application.                    *
 *                                                                            *
 * BBG_Billing is free software; you can redistribute it and/or modify        *
 * it under the terms of the GNU General Public License as published by       *
 * the Free Software Foundation; either version 2 of the License, or          *
 * (at your option) any later version.                                        *
 *                                                                            *
 * BBG_Billing is distributed in the hope that it will be useful,             *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
 * GNU General Public License for more details.                               *
 *                                                                            *
 * You should have received a copy of the GNU General Public License          *
 * along with BBG_Billing; if not, write to the Free Software                 *
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA *
 *****************************************************************************/
 
 
  // Require session.php for user access control
	require "include/session.php";

  // If user is not logged in, redirect to main.php
	if(!$session->logged_in){
		header("Location: main.php");
		exit();
	}

  // Output the POST form to create a new contact
	echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
?>

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta name="ROBOTS" content="NOODP, NOFOLLOW" />
		<meta name="GOOGLEBOT" content="NOODP, NOFOLLOW" />
		<title>Bugs Bee Gone - Billing - Create New Contact</title>
		<meta name="description" content="Bugs Bee Gone - Billing - Create New Contact" />
		<meta name="keywords" content="php, mysql, test, practice" />
		<link rel="shortcut icon" href="" />
		<link href="contact.css" type="text/css" rel="stylesheet" />

		<script type="text/javascript" src="func.inc.js"></script>
	</head>

	<body>

	<div style="text-align: center;">
	<p>Create a New Contact:</p>
	<form action="createContact.php" method="post">
		<table width="500px" align="center" cellspacing="4" cellpadding="2">
		<tr>
			<td valign="top" width="150px">
				Customer ID:
			</td>

			<td valign="top">
				<input type="text" name="customerID" class="required" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				Company:
			</td>

			<td valign="top">
				<input type="text" name="company" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				First Name:
			</td>

			<td valign="top">
				<input type="text" name="firstName" class="required" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				Last Name:
			</td>

			<td valign="top">
				<input type="text" name="lastName" class="required" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				Address:
			</td>

			<td valign="top">
				<input type="text" name="address1" class="required" /><br />
				<input type="text" name="address2" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				City:
			</td>

			<td valign="top">
				<input type="text" name="city" class="required" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				State:
			</td>

			<td valign="top">
				<input type="text" name="state" class="required" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				Zip Code:
			</td>

			<td valign="top">
				<input type="text" name="zipCode" class="required" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				Phone:
			</td>

			<td valign="top">
				<input type="text" name="phone1" class="required" /><br />
				<input type="text" name="phone2" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				Fax:
			</td>

			<td valign="top">
				<input type="text" name="fax" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				E-Mail:
			</td>

			<td valign="top">
				<input type="text" name="email" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				Web Site:
			</td>

			<td valign="top">
				<input type="text" name="webSite" />
			</td>
		</tr>

		<tr>
			<td valign="top" width="150px">
				Notes:
			</td>

			<td valign="top">
				<textarea name="notes" rows="3" id="notes" onkeypress="return checkMaxLength(event,this)" TAMaxLength="250" style="width:350px;"></textarea>
			</td>
		</tr>
		</table>

		<input type="Submit" value="Create Contact" /> <input type="button" onclick="cancel(this)" location="contacts.php" value="Cancel" />
	</form>
	</div>

	</body>
</html>
